﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ITAP.Core.Modelling.Primitives;
using ITAP.Core.Modelling;

namespace ITAP.ShprossesBuilder.Modelling.Components
{
    [Serializable]
    public class ShprossEndToEndConnector : StickConnector
    {
        private AngleInterval allowedInterval;

        public AngleInterval AllowedInterval
        {
            get { return allowedInterval; }
            set { allowedInterval = value; }
        }

        private EndType connectedEndType;

        public EndType ConnectedEndType
        {
            get { return connectedEndType; }
            set { connectedEndType = value; }
        }

        public override void AcceptVisitor(IModelVisitor visitor)
        {
            visitor.Visit(this);
        }

        public override bool IsInTolerance(ModelPoint point, double tolerance)
        {
            if (this.primitives[0].IsInTolerance(point, 5))
                return true;
            else
                return false;
        }

        public override object Clone()
        {
            return base.Clone();
        }
    }
}
